<template>
<!-- 作业管理导航 -->
  <div>
    <router-link v-for="item in state.navs" key="item.id" :to="item.url">
      {{ item.name }}
    </router-link>
   
  </div> 
  <div class="show2"> <router-view></router-view> </div>
  

</template>

<script>
import { reactive, toRefs, onBeforeMount, onMounted } from "vue";
export default {
  setup() {
    const state = reactive({
      navs: [
        { name: "作业任务", id: 1, url: "/jobManagement/jobTasks" },
        { name: "学生答题", id: 2, url: "/jobManagement/studentAnswer" },
        { name: "老师批复", id: 3, url: "/jobManagement/teacheApproval" },
      ],
    });
    console.log(state);

    return {
      state,
    };
  },
};
</script>
<style scoped lang='scss'>
.show2{
    width: 300px;
    height: 300px;
    background-color: aqua;
}
</style>